package com.varian.auth.constant;

import com.varian.redis.model.RKD;
import org.springframework.security.oauth2.core.AuthorizationGrantType;

/**
 * @author ben
 * @since 2024/6/26
 */
public interface AuthConstant {

    AuthorizationGrantType PASSWORD = new AuthorizationGrantType("password");

    String CAPTCHA_UUID = "uuid";
    String CAPTCHA = "captcha";
    RKD KEY_CAPTCHA = RKD.of("验证码缓存键", "captcha:{}");

    // 认证异常
    String AUTHORIZATION_CANNOT_BE_EMPTY = "AUTHORIZATION_CANNOT_BE_EMPTY";
    String TOKEN_CANNOT_BE_EMPTY = "TOKEN_CANNOT_BE_EMPTY";
    String REGISTERED_CLIENT_NOT_EXIST = "REGISTERED_CLIENT_NOT_EXIST";
    String REGISTERED_CLIENT_EXIST = "REGISTERED_CLIENT_EXIST";
}
